<!DOCTYPE html>
<html xmlns:th="http://wwww.thymeleaf.org">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <title>新增器材信息</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="format-detection" content="telephone=no">

  <link rel="stylesheet" th:href="@{/layui/css/layui.css}"  media="all" >
  <script th:src="@{/layui/layui.js}" charset="utf-8"></script>
</head>
<body>
<form class="layui-form layui-form-pane" action="/equ/edit" method="post">
  <input name="equid" type="hidden" th:value="${equipment.equid}">
  <div class="layui-form-item">
    <label class="layui-form-label">器材类型</label>
    <div class="layui-input-inline">
      <select name="equtype">
        <option selected>
          <td th:text="${equipment.equtype}"></td>
        </option>
        <option th:each="equType:${equTypeList}" th:if="${equType} != ${equipment.equtype}" th:value="${equType}" th:text="${equType}"></option>
      </select>
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label">生产厂商</label>
    <div class="layui-input-block">
      <input type="text" name="equmanufacturer" th:value="${equipment.equmanufacturer}" lay-verify="required" autocomplete="off" placeholder="请输入生产厂商" class="layui-input">
    </div>
  </div>


  <div class="layui-form-item">
    <div class="layui-inline">
      <label class="layui-form-label">购置日期</label>
      <div class="layui-input-block">
        <input type="text" name="equindate" th:value="${equipment.equindate}" lay-verify="required" id="date1" autocomplete="off" class="layui-input">
      </div>
    </div>
    <div class="layui-inline">
      <label class="layui-form-label">数量</label>
      <div class="layui-input-inline">
        <input type="text" name="equnum" th:value="${equipment.equnum}" lay-verify="required" autocomplete="off" class="layui-input">
      </div>
    </div>
  </div>

  <div class="layui-form-item">
    <button class="layui-btn" lay-submit="" lay-filter="addEqu">更新</button>
    <a href="/equ/query" class="layui-btn">返回</a>
  </div>
</form>

<script th:src="@{/layui/layui.js}" charset="utf-8"></script>
<script>
  layui.use(['form', 'layedit', 'laydate'], function(){
    var form = layui.form
            ,layer = layui.layer
            ,layedit = layui.layedit
            ,laydate = layui.laydate;

    //日期
    laydate.render({
      elem: '#date'
    });
    laydate.render({
      elem: '#date1'
    });

    //创建一个编辑器
    var editIndex = layedit.build('LAY_demo_editor');

  });
</script>
</body>
</html>